package com.whfc.hdc.dao;

import com.whfc.hdc.dto.AlgDeviceStreamDTO;
import com.whfc.hdc.entity.AlgDeviceStream;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author qzexing
 * @version 1.0
 * @date 2021-08-02 15:14
 */
@Repository
public interface AlgDeviceStreamMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(AlgDeviceStream record);

    int insertSelective(AlgDeviceStream record);

    AlgDeviceStream selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(AlgDeviceStream record);

    int updateByPrimaryKey(AlgDeviceStream record);

    /**
     * 根据设备SN查找 视频流地址
     *
     * @param sn 设备SN
     * @return 视频流地址
     */
    List<AlgDeviceStreamDTO> selectBySn(@Param("sn") String sn);

    /**
     * 逻辑删除视频流地址
     *
     * @param streamId 视频流ID
     */
    void logicDel(@Param("streamId") Integer streamId);
}